﻿#region Using Directives

using System;

#endregion Using Directives

namespace SharePointStu.CAMLHelper
{
	/// <summary>
	/// Invalid field value exception class.
	/// </summary>
	public class InvalidFieldValueException : BaseException
	{
		#region Constructors and Destructors

		/// <summary>
		/// Initialises a new instance of the <see cref="T:SharePointStu.CAMLHelper.InvalidFieldValueException"/> class.
		/// </summary>
		/// <param name="field">The object we were trying to update.</param>
		/// <param name="fieldType">The type of the field.</param>
		/// <param name="value">The id that we were trying to load as a Guid.</param>
		public InvalidFieldValueException(string field, CAML.Types.FieldTypes fieldType, string value)
		{
			string s = Exceptions.InvalidFieldValue;
			_msg = string.Format(s, field, fieldType.ToString(), value);
		}

		#endregion Constructors and Destructors
	}
}
